package com.example.cks_show_text;

import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.util.Log;


import com.example.cks_show_text.model.CksShow;
import com.example.cks_show_text.usb.FaceHandlerUSB;
import com.example.cks_show_text.usb.test;
import com.example.cks_show_text.xml.CksData;

import java.util.List;

public class MyApplication extends Application {
    static String TAG = MyApplication.class.getSimpleName();
    private static Context mContext;
    public static Context getMContenx(){
        return mContext;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        mContext = getApplicationContext();
//        new test();
        if(CksData.getObject(mContext,"1") == null){
            Log.d(TAG, "onCreate: 生成数据");
            initData();
        }
    }

    private void initData() {
        CksShow cksShow = new CksShow("正在焊接良品","系列 16","车型 825B","番号 413108-10360-50");
        CksData.setObject(mContext,"1",cksShow);
        CksShow cksShow2 = new CksShow("正在焊接良品","系列 10","车型 2QL","番号 435202-10780-B");
        CksData.setObject(mContext,"2",cksShow2);
    }
}
